import request from "@/router/axios";

// 获取客户专属二维码
export function customerQrCode(obj) {
	return request({
		url: "/cp/cuqc/qr-code",
		method: "get",
		params: obj
	})
}

// 获取客户专属二维码
export function customerQrCodeInfo(obj) {
	return request({
		url: `/cp/cuqc/qr-code-post?operType=0&wxUserId=${obj.wxUserId}&wxExternalUserid=${obj.wxExternalUserid}`,
		method: "post",
		data: obj.file,
	})
}

// 上传名片接口
export function uploadPic(obj) {
	return request({
		url: `/cp/cuqc/upload?codeId=${obj.codeId}`,
		method: "post",
		data: obj.file,
		headers: {
			"content-type": "multipart/form-data"
		}
	})
}

// 获取客户经理信息
export function manageInfo(obj) {
	return request({
		url: "/cp/cuqc/qr-code-web",
		method: "get",
		params: obj
	})
}

// 直接调企业微信接口获取二维码
export function getWxQrCode(access_token, obj) {
	return request({
		url: `https://qyapi.weixin.qq.com/cgi-bin/externalcontact/add_contact_way?access_token=${access_token}`,
		method: "post",
		data: obj
	})
}


// 获取客户邀请来的客户数据分页
export function inviteCustomerData(obj) {
	return request({
		url: "/cp/cuqc/page",
		method: "get",
		params: obj
	})
}